package goover.unit06;

public class ThreadDemo01 {
    public static void main(String[] args){
        Thread01 t1 = new Thread01("Thread1");
        t1.start();
        Thread01 t2 = new Thread01("Thread2");
        t2.start();
        Thread01 t3 = new Thread01("Thread3");
        t3.start();
    }
}
class Thread01 extends Thread{
    public Thread01(String name){
        super(name);
    }
    @Override
    public void run() {
        int i = 0;
        while (i++ < 3){
            System.out.println(Thread01.currentThread().getName());
        }
    }
}
